﻿using System;

namespace Kwik.Orm
{
	/// <summary>
	/// Constraint signature
	/// </summary>
	public interface ISchemaConstraint
	{
		/// <summary>
		/// Constraint name
		/// </summary>
		string Name { get; set; }
		/// <summary>
		/// Constraint type
		/// </summary>
		ConstraintType Type { get; set; }
		/// <summary>
		/// Constraint update action
		/// </summary>
		ConstraintAction UpdateAction { get; set; }
		/// <summary>
		/// Constraint delete action
		/// </summary>
		ConstraintAction DeleteAction { get; set; }
		/// <summary>
		/// Name of the table to which this constraint applies
		/// </summary>
		string Table { get; set; }
		/// <summary>
		/// Name of the column to which this constraint applies
		/// </summary>
		string Column { get; set; }
		/// <summary>
		/// Name of the reference table to which this constraint applies, for foreignkey constraints
		/// </summary>
		string ReferenceTable { get; set; }
		/// <summary>
		/// Name of the reference column to which this constraint applies, for foreignkey constraints
		/// </summary>
		string ReferenceColumn { get; set; }
	}
}
